package exception;

import java.io.FileOutputStream;
import java.io.IOException;

public class AutoCloseableDemo {
    public static void main(String[] args) throws IOException {
        try(
                FileOutputStream fos=new FileOutputStream("fos.dat")
        ){
            fos.write(314);
        }catch (IOException e){
            e.printStackTrace();
        }
    }
}
